Fix handling of junctions in frame drawing code
authorMatthias Clasen <mclasen@redhat.com>
Tue, 23 Nov 2010 21:13:15 +0000 (16:13 -0500)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:39:38 +0000 (15:39 +0100)
gtk/gtkthemingengine.c

index d1f955050a8a6b9016ba3999e926f698573af2aa..c3e1924599ffda2bb69ca736ce2b21b7fe20d3b5 100644 (file)
@@ -1206,8 +1206,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
   if (sides & SIDE_RIGHT)
     {
       if (radius == 0 ||
-          (junction & GTK_JUNCTION_TOP) ||
-          (junction & GTK_JUNCTION_RIGHT))
+          (junction & GTK_JUNCTION_CORNER_TOPRIGHT))
         cairo_move_to (cr, x + width, y);
       else
         {
@@ -1216,8 +1215,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
         }
 
       if (radius == 0 ||
-          (junction & GTK_JUNCTION_BOTTOM) ||
-          (junction & GTK_JUNCTION_RIGHT))
+          (junction & GTK_JUNCTION_CORNER_BOTTOMRIGHT))
         cairo_line_to (cr, x + width, y + height);
       else
         cairo_arc (cr, x + width - radius, y + height - radius, radius, 0, G_PI / 4);
@@ -1226,8 +1224,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
   if (sides & SIDE_BOTTOM)
     {
       if (radius != 0 &&
-          ! (junction & GTK_JUNCTION_RIGHT) &&
-          ! (junction & GTK_JUNCTION_BOTTOM))
+          ! (junction & GTK_JUNCTION_CORNER_BOTTOMRIGHT))
         {
           if ((sides & SIDE_RIGHT) == 0)
             cairo_new_sub_path (cr);
@@ -1238,8 +1235,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
         cairo_move_to (cr, x + width, y + height);
 
       if (radius == 0 ||
-          (junction & GTK_JUNCTION_BOTTOM) ||
-          (junction & GTK_JUNCTION_LEFT))
+          (junction & GTK_JUNCTION_CORNER_BOTTOMLEFT))
         cairo_line_to (cr, x, y + height);
       else
         cairo_arc (cr, x + radius, y + height - radius, radius, G_PI / 2, 3 * (G_PI / 4));
@@ -1250,8 +1246,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
   if (sides & SIDE_LEFT)
     {
       if (radius != 0 &&
-          ! (junction & GTK_JUNCTION_LEFT) &&
-          ! (junction & GTK_JUNCTION_BOTTOM))
+          ! (junction & GTK_JUNCTION_CORNER_BOTTOMLEFT))
         {
           if ((sides & SIDE_BOTTOM) == 0)
             cairo_new_sub_path (cr);
@@ -1262,8 +1257,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
         cairo_move_to (cr, x, y + height);
 
       if (radius == 0 ||
-          (junction & GTK_JUNCTION_TOP) ||
-          (junction & GTK_JUNCTION_LEFT))
+          (junction & GTK_JUNCTION_CORNER_TOPLEFT))
         cairo_line_to (cr, x, y);
       else
         cairo_arc (cr, x + radius, y + radius, radius, G_PI, G_PI + G_PI / 4);
@@ -1272,8 +1266,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
   if (sides & SIDE_TOP)
     {
       if (radius != 0 &&
-          ! (junction & GTK_JUNCTION_TOP) &&
-          ! (junction & GTK_JUNCTION_LEFT))
+          ! (junction & GTK_JUNCTION_CORNER_TOPLEFT))
         {
           if ((sides & SIDE_LEFT) == 0)
             cairo_new_sub_path (cr);
@@ -1284,8 +1277,7 @@ _cairo_round_rectangle_sides (cairo_t          *cr,
         cairo_move_to (cr, x, y);
 
       if (radius == 0 ||
-          (junction & GTK_JUNCTION_TOP) ||
-          (junction & GTK_JUNCTION_RIGHT))
+          (junction & GTK_JUNCTION_CORNER_TOPRIGHT))
         cairo_line_to (cr, x + width, y);
       else
         cairo_arc (cr, x + width - radius, y + radius, radius, 3 * (G_PI / 2), - G_PI / 4);